<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools"/>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:1px;">
    <t:datagrid name="platformList" title="" actionUrl="platformController.do?select_datagrid" idField="platformId" fit="true" queryMode="group" onLoadSuccess="bandImg">
      <t:dgCol title="主键" field="platformId" hidden="true"></t:dgCol>
      <t:dgCol title="平台名称" field="name" query="true" width="1"></t:dgCol>
      <t:dgCol title="平台编码" field="platformCode"  width="1" query="true"></t:dgCol>
      <t:dgCol title="平台key" field="platformkey"  width="2"></t:dgCol>
      <%--<t:dgCol title="平台密钥" field="platformSecret"  width="2"></t:dgCol>--%>
      <%--<t:dgCol title="是否开通" field="open" dictionary="isno"  width="1" query="true"></t:dgCol>--%>

      <%--<t:dgCol title="common.operation" field="opt" width="1"></t:dgCol>--%>
      <%--<t:dgDelOpt url="platformController.do?del&platformId={platformId}" title="删除"></t:dgDelOpt>--%>

      <%--<t:dgToolBar title="新增" icon="icon-add" url="platformController.do?addorupdate" funname="add"  width="600" height="300"></t:dgToolBar>--%>
      <%--<t:dgToolBar title="修改" icon="icon-edit" url="platformController.do?addorupdate" funname="f_updateInfo"  width="600" height="300"></t:dgToolBar>--%>

    </t:datagrid>
  </div>
</div>
<script type="text/javascript">
  function avatarFormatter(val,row){
    return '<a rel="datagrid_group" href="'+val+'" title=""><img alt="" src="'+val+'" style="width:30px;height:30px;"></a>';
  }
  function bandImg(){
    $("a[rel=datagrid_group]").fancybox({
      'overlayShow'	: false,
      'transitionIn'	: 'elastic',
      'transitionOut'	: 'elastic'
    });
  }

  function f_updateInfo(title, url, id, width, height) {
    var rowsData = $('#'+id).datagrid('getSelections');
    if (!rowsData || rowsData.length==0) {
      tip('请选择分平台');
      return;
    }
    if (rowsData.length>1) {
      tip('请选择一条分平台再编辑');
      return;
    }
    url += '&platformId='+rowsData[0].platformId;
    createwindow(title, url, width, height);
  }
</script>
